#pragma once

#include <iostream>
#include <functional>

#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/wait.h>

#include "inetaddr.hpp"
#include "log.hpp"

enum ExitCord
{
    SUCCESS = 0,
    ERR_SER,
    ERR_CLI,
    ERR_SOCKET,
    ERR_BIND,
    ERR_LISTEN,
    ERR_CONNECT,
    ERR_FORK
};

void SerErr()
{
    Local_Log::LOG(Local_Log::LogLever::LINFO) << "sendto error";
    std::cout << "Usage ./server port" << std::endl;
}
void CliErr()
{
    Local_Log::LOG(Local_Log::LogLever::LINFO) << "sendto error";
    std::cout << "Usage ./client ip port" << std::endl;
}
class NoCopy
{
public:
    NoCopy() {}
    ~NoCopy() {}
    NoCopy(const NoCopy &cpy) = delete;
    const NoCopy &operator=(const NoCopy &cpy) = delete;
};